class Cartasur::Topic < Cartasur::CartasurModel
  attr_accessible :last_post_at, :last_poster_id, :name, :forum_id, :user_id

  belongs_to :forum, class_name: 'Cartasur::Forum'
  has_many :posts, :dependent => :destroy
  belongs_to :user, :class_name => 'Cartasur::User'

  def replies
    Cartasur::Topic.where("reply")
  end
end
